﻿namespace EventHandlerDemo.Domain.Bases
{
    public interface IUnitOfWork : IDisposable
    {
        void BeginTransaction();
        int Commit();
        Task<int> CommitAsync(CancellationToken cancellationToken = default);
        void Rollback();
        Task RollbackAsync();
        Task<int> SaveChangeAsync(CancellationToken cancellationToken = default);
    }
}
